package main

import (
	"miniDW/src/engine"
	"miniDW/src/log"
	"time"
)

func main() {
	start := time.Now()
	cfg, err := engine.LoadCfgFile("config/sql.json")
	if err != nil {
		_ = log.Error(err)
		return
	}

	t, err := engine.CreateTask(cfg)
	if err != nil {
		_ = log.Error(err)
		return
	}
	defer t.Close()

	t.Run()

	end := time.Now()
	spend := end.Sub(start)
	log.Info("总耗费时长为：" + spend.String())
	return
}
